import 'package:lishopflu/base/controller_import.dart';
import 'package:lishopflu/entity/address_bean.dart';

class OrderConfirmCtl extends BaseController{

  var productId = ''.obs;
  var addressBean = AddressBean.init().obs;

  @override
  void onFirst() {
    if(appArguments!=null && appArguments.params!=null){
      Map arguments = appArguments.params;
      productId = arguments[RouterKey.PRODUCT_ID];
      LiLog.d(arguments);
    }
  }

  @override
  void onDestroy() {

  }

  void toAddressChoose() async {
    var arguments = await Get.toNamed(AppPages.ADDRESS_CHOOSE, arguments: AppArguments(obj: addressBean.value)) as AppArguments;
    addressBean.value = arguments.obj;
  }
}